using System.Collections.Generic;
using SearchTools.Providers;
using StructureMap;

namespace Searchtools.Providers
{
    /// <summary>
    /// Mock user metadata provider for tesing purposes
    /// </summary>
    [Pluggable("MockMember", "")]
    public class MemberMeta : IMetadataProvider
    {
        #region IMetadataProvider Members

        /// <summary>
        /// Return value for field for current item s
        /// </summary>
        /// <param name="field">Field specifier</param>
        /// <returns>Term list</returns>
        public Dictionary<string, int> this[string field]
        {
            get
            {
                Dictionary<string, int> ret = new Dictionary<string, int>();

                ret.Add("nuclear power", 1);
                ret.Add("europe", 1);

                return ret;
            }
        }

        /// <summary>
        /// Return value for field for item specified by key
        /// </summary>
        /// <param name="key"></param>
        /// <param name="field"></param>
        /// <returns>Term list</returns>
        public Dictionary<string, int> this[string key, string field]
        {
            get
            {
                Dictionary<string, int> ret = new Dictionary<string, int>();

                ret.Add("nuclear power", 1);
                ret.Add("europe", 1);

                return ret;
            }
        }

        #endregion
    }

    /// <summary>
    /// Mock page metadata provider for tesing purposes
    /// </summary>
    [Pluggable("MockPage", "")]
    public class PageMeta : IMetadataProvider
    {
        #region IMetadataProvider Members

        /// <summary>
        /// Return value for field for current item 
        /// </summary>
        /// <param name="field">Field specifier</param>
        /// <returns>Term list</returns>
        public Dictionary<string, int> this[string field]
        {
            get
            {
                Dictionary<string, int> ret = new Dictionary<string, int>();

                ret.Add("gibbon", 1);
                ret.Add("waste", 1);

                return ret;
            }
        }

        /// <summary>
        /// Return value for field for item specified by key
        /// </summary>
        /// <param name="key"></param>
        /// <param name="field"></param>
        /// <returns>Term list</returns>
        public Dictionary<string, int> this[string key, string field]
        {
            get
            {
                Dictionary<string, int> ret = new Dictionary<string, int>();

                ret.Add("gibbon", 1);
                ret.Add("waste", 1);

                return ret;
            }
        }

        #endregion
    }
}